package org.springframework.security.samples.config;

import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Component;

/**
 * @author Webster
 * <p>
 * Description:加密类
 * </p>
 * @date 2021/3/10
 * @see org.springframework.security.samples.config
 */
@Component
public class MyPasswordEncoder implements PasswordEncoder {
	@Override
	public String encode(CharSequence charSequence) {
		return charSequence.toString();
	}

	@Override
	public boolean matches(CharSequence charSequence, String s) {
		return s.equals(charSequence.toString());
	}
}
